<?php
/*
    Meta777 is Web-based AI Software.

    Copyright (C) 2013  White Rabbit

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
$itx['config']['com-front'] = getLocalConfig("com-front");
$cxtpl = new XTemplate(pathprivate.'localization/'.$itx['user']['lang'].'/Components/com-' . $itx['get']['com'] . '/xtpl/'.$itx['get']['action'].'.xtpl');
$cxtpl->assign("token",$token);
$cxtpl->assign("pagetitle",strip_tags(mysimpletextdecode($itx,$itx['config']['com-front']['page']['title'])));
$cxtpl->assign("welcometitle",strip_tags(mysimpletextdecode($itx,$itx['config']['com-front']['welcome']['title'])));
$cxtpl->assign("welcomecontent",mysimpletextdecode($itx,$itx['config']['com-front']['welcome']['content']));
$cxtpl->assign("promisetitle",strip_tags(mysimpletextdecode($itx,$itx['config']['com-front']['promise']['title'])));
$cxtpl->assign("promisecontent",mysimpletextdecode($itx,$itx['config']['com-front']['promise']['content']));
$cxtpl->assign("currid",$itx['get']['id']);

$itx['config']['com-user'] = getLocalConfig("com-user");
$cxtpl->assign("loginintro",mysimpletextdecode($itx,$itx['config']['com-user']['login']['intro']));
$cxtpl->assign("registrationintro",mysimpletextdecode($itx,$itx['config']['com-user']['registration']['intro']));

if (allowLogin) {

if (allowRegistration) {
$cxtpl->parse("component.loginregister.registration");
}
if($itx['user']['user-group'] == "user-guest") {
include(pathprivate."widgets/widg-lsq/main.php");
$cxtpl->assign("widglsq",$itx['widg']['block']);
if (allowRegistration) {
$cxtpl->parse("component.loginregister.registration");
}
$cxtpl->parse("component.loginregister1");
$cxtpl->parse("component.loginregister");
}
}
$cxtpl->parse("component");
$itx['block']['com'] = $cxtpl->iout("component");
$itx['page']['name'] = "Home";
?>
